<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
..\FrameXML\UI.xsd">

	<Frame name="DBM_API" hidden="false">
		<Scripts>
			<OnLoad>				
				DBM.OnLoad();
				this.elapsed = 0;
			</OnLoad>
			<OnEvent>
				DBM.OnEvent(event, ...);
			</OnEvent>
			<OnUpdate>
				this.elapsed = this.elapsed + arg1;
				if this.elapsed > 0.066 then					
					DBM.OnUpdate(this.elapsed);
					this.elapsed = 0;
				end
				DBM.SpecialWarningsOnUpdate(arg1);
			</OnUpdate>
		</Scripts>
	</Frame>
	
	<MessageFrame name="DBMWarningFrame" displayDuration="5" insertMode="TOP" parent="UIParent" frameStrata="HIGH" toplevel="true">
		<Size>
			<AbsDimension x="768" y="60"/>
		</Size>
		<Anchors>
			<Anchor point="BOTTOM">
				<Offset>
					<AbsDimension x="0" y="235"/>
				</Offset>
			</Anchor>
		</Anchors>
		<FontString inherits="ErrorFont" justifyH="CENTER"/>
	</MessageFrame>	
	
	
	<Frame name="DBMUpdateDialog" toplevel="true" frameStrata="DIALOG" hidden="true" parent="UIParent">
		<Anchors>
			<Anchor point="TOP">
				<Offset>
					<AbsDimension x="0" y="-230"/>
				</Offset>
			</Anchor>
		</Anchors>
		<Size>
			<AbsDimension x="430" y="90"/>
		</Size>
		<Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background" edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
			<EdgeSize>
				<AbsValue val="32"/>
			</EdgeSize>
			<TileSize>
				<AbsValue val="32"/>
			</TileSize>
			<BackgroundInsets>
				<AbsInset left="11" right="12" top="12" bottom="11"/>
			</BackgroundInsets>
		</Backdrop>
		<Layers>
			<Layer level="ARTWORK">
				<FontString name="$parentText" inherits="GameFontNormal" justifyH="CENTER" justifyV="TOP" nonspacewrap="true">
					<Size>
						<AbsDimension x="410" y="0"/>
					</Size>
					<Anchors>
						<Anchor point="TOP">
							<Offset>
								<AbsDimension x="0" y="-16"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		<Frames>
			<Button name="$parentButton2">
				<Size>
					<AbsDimension x="144" y="22"/>
				</Size>
				<Anchors>
					<Anchor point="BOTTOM">
						<Offset>
							<AbsDimension x="-122" y="12"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						DBMPatchnoteFrameMessageFrame:Clear();
						DBMPatchnoteFrame:Show();
						DBM.RequestPatchnotes(DBM.UpdateDialogShown);
						this:GetParent():Hide();
					</OnClick>
				</Scripts>
				<NormalTexture inherits="DialogButtonNormalTexture"/>
				<PushedTexture inherits="DialogButtonPushedTexture"/>
				<HighlightTexture inherits="DialogButtonHighlightTexture"/>
				<ButtonText text="DBM_SHOW_PATCHNOTES"/>
				<NormalFont inherits="GameFontNormal"/>
				<HighlightFont inherits="GameFontHighlight"/>
			</Button>
			<Button name="$parentButton3">
				<Size>
					<AbsDimension x="144" y="22"/>
				</Size>
				<Anchors>
					<Anchor point="LEFT" relativeTo="$parentButton2" relativePoint="RIGHT">
						<Offset>
							<AbsDimension x="10" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						StaticPopup_Show("COPY_DBM_URL");
					</OnClick>
				</Scripts>
				<NormalTexture inherits="DialogButtonNormalTexture"/>
				<PushedTexture inherits="DialogButtonPushedTexture"/>
				<HighlightTexture inherits="DialogButtonHighlightTexture"/>
				<ButtonText text="DBM_COPY_PASTE_URL"/>
				<NormalFont inherits="GameFontNormal"/>
				<HighlightFont inherits="GameFontHighlight"/>
			</Button>
			<Button name="$parentButton">
				<Size>
					<AbsDimension x="80" y="22"/>
				</Size>
				<Anchors>
					<Anchor point="LEFT" relativeTo="$parentButton3" relativePoint="RIGHT">
						<Offset>
							<AbsDimension x="10" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						this:GetParent():Hide();
					</OnClick>
				</Scripts>
				<NormalTexture inherits="DialogButtonNormalTexture"/>
				<PushedTexture inherits="DialogButtonPushedTexture"/>
				<HighlightTexture inherits="DialogButtonHighlightTexture"/>
				<ButtonText text="DBM_CLOSE"/>
				<NormalFont inherits="GameFontNormal"/>
				<HighlightFont inherits="GameFontHighlight"/>
			</Button>
		</Frames>
	</Frame>
	
	<Frame name="DBMPatchnoteFrame" parent="UIParent" frameStrata="DIALOG" toplevel="true" hidden="true" enableMouse="true" movable="true">
		<Size>
			<AbsDimension x="600" y="450"/>
		</Size>
		<Anchors>
			<Anchor point="CENTER" relativePoint="CENTER">
				<Offset>
					<AbsDimension x="0" y="50"/>
				</Offset>
			</Anchor>
		</Anchors>
		<Backdrop bgFile="Interface\Tooltips\UI-Tooltip-Background" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
			<EdgeSize>
				<AbsValue val="16"/>
			</EdgeSize>
			<TileSize>
				<AbsValue val="16"/>
			</TileSize>
			<BackgroundInsets>
				<AbsInset left="5" right="5" top="5" bottom="5"/>
			</BackgroundInsets>
		</Backdrop>
		<Frames>
			<Frame name="$parentTitle">
				<Size>
					<AbsDimension x="150" y="40"/>
				</Size>
				<Anchors>
					<Anchor point="CENTER" relativePoint="TOP">
						<Offset>
							<AbsDimension x="0" y="-2.5"/>
						</Offset>
					</Anchor>
				</Anchors>
		
				<Backdrop bgFile="Interface\Tooltips\UI-Tooltip-Background" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
					<EdgeSize>
						<AbsValue val="16"/>
					</EdgeSize>
					<TileSize>
						<AbsValue val="16"/>
					</TileSize>
					<BackgroundInsets>
						<AbsInset left="5" right="5" top="5" bottom="5"/>
					</BackgroundInsets>
				</Backdrop>
				
				<Layers>
					<Layer level="BACKGROUND">
						<Texture name="$parentBackgroundTexture">
							<Anchors>
								<Anchor point="CENTER" relativePoint="CENTER"/>
							</Anchors>
							<Size>
								<AbsDimension x="144" y="30"/>
							</Size>
							<Color r="0" g="0" b="0" a="1"/>
						</Texture>
					</Layer>
					<Layer level="ARTWORK">
						<FontString name="$parentText" text="DBM_PATCHNOTES" inherits="GameFontNormalLarge">
							<Anchors>
								<Anchor point="CENTER"/>
							</Anchors>
						</FontString>
					</Layer>					
				</Layers>
				<Scripts>
					<OnLoad>
						this:SetBackdropColor(0, 0, 0, 0.7);
					</OnLoad>
					<OnMouseDown>
						if arg1 == "LeftButton" then
							this:GetParent():StartMoving();
							this:GetParent().isMoving = true;
						end
					</OnMouseDown>
					<OnMouseUp>
						if (this:GetParent().isMoving) then
							this:GetParent():StopMovingOrSizing();
							this:GetParent().isMoving = false;
						end
					</OnMouseUp>
					<OnHide>
						if (this:GetParent().isMoving) then
							this:GetParent():StopMovingOrSizing();
							this:GetParent().isMoving = false;
						end
					</OnHide>
				</Scripts>
			</Frame>
			<ScrollingMessageFrame name="$parentMessageFrame" maxLines="9999" displayDuration="999">
				<Size>
					<AbsDimension x="590" y="425"/>
				</Size>
				<Anchors>
					<Anchor point="BOTTOM" relativePoint="BOTTOM">
						<Offset>
							<AbsDimension x="2" y="6"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Frames>
					<Button name="$parentUpButton">
						<Size>
							<AbsDimension x="32" y="32"/>
						</Size>
						<Scripts>
							<OnLoad>
								MessageFrameScrollButton_OnLoad();
								this:ClearAllPoints()
								this:SetPoint("LEFT", this:GetParent(), "RIGHT", -2, 16)
							</OnLoad>
							<OnUpdate>
								MessageFrameScrollButton_OnUpdate(arg1);
							</OnUpdate>
							<OnClick>
								if ( this:GetButtonState() == "PUSHED" ) then
									this.clickDelay = MESSAGE_SCROLLBUTTON_INITIAL_DELAY;
								else
									PlaySound("igChatScrollUp");
									this:GetParent():ScrollUp();
								end
							</OnClick>
						</Scripts>
						<NormalTexture file="Interface\ChatFrame\UI-ChatIcon-ScrollUp-Up"/>
						<PushedTexture file="Interface\ChatFrame\UI-ChatIcon-ScrollUp-Down"/>
						<DisabledTexture file="Interface\ChatFrame\UI-ChatIcon-ScrollUp-Disabled"/>
						<HighlightTexture file="Interface\Buttons\UI-Common-MouseHilight" alphaMode="ADD"/>
					</Button>
					<Button name="$parentDownButton">
						<Size>
							<AbsDimension x="32" y="32"/>
						</Size>
						<Scripts>
							<OnLoad>
								MessageFrameScrollButton_OnLoad();
								this:ClearAllPoints();
								this:SetPoint("TOP", getglobal(this:GetParent():GetName().."UpButton"), "BOTTOM", 0, 0);
							</OnLoad>
							<OnUpdate>
								MessageFrameScrollButton_OnUpdate(arg1);
							</OnUpdate>
							<OnClick>
								if ( this:GetButtonState() == "PUSHED" ) then
									this.clickDelay = MESSAGE_SCROLLBUTTON_INITIAL_DELAY;
								else
									PlaySound("igChatScrollDown");
									this:GetParent():ScrollDown();
								end
							</OnClick>
						</Scripts>
						<NormalTexture file="Interface\ChatFrame\UI-ChatIcon-ScrollDown-Up"/>
						<PushedTexture file="Interface\ChatFrame\UI-ChatIcon-ScrollDown-Down"/>
						<DisabledTexture file="Interface\ChatFrame\UI-ChatIcon-ScrollDown-Disabled"/>
						<HighlightTexture file="Interface\Buttons\UI-Common-MouseHilight" alphaMode="ADD"/>
					</Button>
					<Button name="$parentButton">
						<Size>
							<AbsDimension x="80" y="22"/>
						</Size>
						<Anchors>
							<Anchor point="TOP" relativePoint="BOTTOM">
								<Offset>
									<AbsDimension x="0" y="-3"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnClick>
								this:GetParent():GetParent():Hide();
								DBMUpdateDialog:Show();
							</OnClick>
						</Scripts>
						<NormalTexture inherits="DialogButtonNormalTexture"/>
						<PushedTexture inherits="DialogButtonPushedTexture"/>
						<HighlightTexture inherits="DialogButtonHighlightTexture"/>
						<ButtonText text="DBM_CLOSE"/>
						<NormalFont inherits="GameFontNormal"/>
						<HighlightFont inherits="GameFontHighlight"/>
					</Button>
				</Frames>
				<FontString inherits="GameFontHighlight" justifyH="LEFT"/>
			</ScrollingMessageFrame>
		</Frames>
		<Scripts>
			<OnLoad>
				this:SetBackdropColor(0, 0, 0, 0.7);
			</OnLoad>
		</Scripts>
	</Frame>	
	
	<Frame name="DBMSpecialWarningFrame" parent="UIParent" frameStrata="DIALOG" toplevel="true" hidden="true">
		<Size>
			<AbsDimension x="1000" y="60"/>
		</Size>
		<Anchors>
			<Anchor point="CENTER" relativeTo="UIParent" relativePoint="CENTER">
				<Offset>
					<AbsDimension x="0" y="75"/>
				</Offset>
			</Anchor>
		</Anchors>
		<Layers>
			<Layer level="OVERLAY">
				<FontString name="$parentText" justifyH="CENTER">
					<Size>
						<AbsDimension x="1000" y="60"/>
					</Size>
					<Anchors>
						<Anchor point="CENTER" relativePoint="CENTER">
							<Offset>
								<AbsDimension x="0" y="0"/>
							</Offset>
						</Anchor>
					</Anchors>
					<FontHeight>
						<AbsValue val="50"/>
					</FontHeight>
					<Color r="0" g="0" b="1.0"/>
				</FontString>
			</Layer>
		</Layers>
		<Scripts>
			<OnLoad>
				getglobal(this:GetName().."Text"):SetFont(STANDARD_TEXT_FONT, 50, "THICKOUTLINE");
			</OnLoad>
		</Scripts>
	</Frame>
	
	<Button name="DBMMinimapButton" parent="Minimap" hidden="true" frameStrata="MEDIUM">
		<Size>
			<AbsDimension x="32" y="32"/>
		</Size>
		<Scripts>
			<OnClick>
				if IsAddOnLoaded("DBM_GUI") then
					if DBMBossModFrame:IsShown() then
						HideUIPanel(DBMBossModFrame);
					else
						ShowUIPanel(DBMBossModFrame);
					end
				else
					local loaded, reason = LoadAddOn("DBM_GUI")
					if loaded then
						DBMBossModFrame_OnEvent("PLAYER_LOGIN");
						if DBMBossModFrame:IsShown() then
							HideUIPanel(DBMBossModFrame);
						else
							ShowUIPanel(DBMBossModFrame);
						end
					else
						if reason then
							DBM.AddMsg(string.format(DBM_LOAD_GUI_ERROR_FORMAT, reason));
						else
							DBM.AddMsg(DBM_LOAD_GUI_ERROR_UNKNOWN);
						end
					end
				end
			</OnClick>
			<OnMouseUp>

			</OnMouseUp>
			<OnEnter>
				GameTooltip_SetDefaultAnchor(GameTooltip, UIParent);
				GameTooltip:SetText("Deadly Boss Mods");
			</OnEnter>
			<OnLeave>
				GameTooltip:Hide();
			</OnLeave>
		</Scripts>
		<NormalTexture file="Interface\AddOns\DBM_API\Textures\Minimap-Button-Up"/>
		<PushedTexture file="Interface\AddOns\DBM_API\Textures\Minimap-Button-Down"/>
		<HighlightTexture alphaMode="ADD" file="Interface\Minimap\UI-Minimap-ZoomButton-Highlight"/>
	</Button>	
	
	
	<GameTooltip name="DBMTooltip" frameStrata="TOOLTIP" hidden="true" inherits="GameTooltipTemplate"> 
		<Scripts>
			<OnLoad>
				this:SetOwner(WorldFrame, "ANCHOR_NONE");
			</OnLoad>
		</Scripts>
	</GameTooltip>
	
	<Frame name="DBMBlueFlashFrame" toplevel="true" parent="UIParent" setAllPoints="true" hidden="true">
		<Layers>
			<Layer level="BACKGROUND">
				<Texture file="Interface\FullScreenTextures\OutOfControl" alphaMode="ADD"/>
			</Layer>
		</Layers>
	</Frame>
	
	<!-- 
		The next few Frames are needed for the INFO FRAME 
	-->
	<Frame name="DBMInfoFrameTrash" hidden="true" frameStrata="BACKGROUND" parent="UIParent">
		<Anchors>
			<Anchor point="TOPLEFT"/>
		</Anchors>
		<Size>
			<AbsDimension x="1" y="1"/>
		</Size>
	</Frame>
	

	<Frame name="DBMInfoFrameTemplate" hidden="true" frameStrata="DIALOG" movable="true" parent="UIParent" virtual="true">
		<Anchors>
			<Anchor point="CENTER"/>
		</Anchors>
		<Size>
			<AbsDimension x="100" y="50"/>
		</Size>
		<Layers>
			<Layer level="ARTWORK">
				<FontString name="$parentTitle" inherits="GameFontNormal" text="">
					<Anchors>
						<Anchor point="TOP">
							<Offset>
								<AbsDimension x="0" y="-5"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
				<FontString name="$parentText" inherits="ChatFontNormal" text="">
					<Anchors>
						<Anchor point="TOP">
							<Offset>
								<AbsDimension x="0" y="-20"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		<Backdrop bgFile="Interface\Tooltips\UI-Tooltip-Background" edgeFile="Interface\Tooltips\UI-Tooltip-Border" setAllPoints="true" tile="true">
			<EdgeSize>
				<AbsValue val="16"/>
			</EdgeSize>
			<TileSize>
				<AbsValue val="16"/>
			</TileSize>
			<BackgroundInsets>
				<AbsInset left="5" right="5" top="5" bottom="5"/>
			</BackgroundInsets>
		</Backdrop>
	</Frame>

	<Frame name="DBMInfoFrameTemplateTextField" virtual="true">
		<Anchors>
			<Anchor point="CENTER"/>
		</Anchors>
		<Size>
			<AbsDimension x="100" y="16"/>
		</Size>
		<Layers>
			<Layer level="ARTWORK">
				<FontString name="$parentText" inherits="ChatFontNormal" text="">
					<Anchors>
						<Anchor point="TOP">
							<Offset>
								<AbsDimension x="0" y="0"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
	</Frame>

	<StatusBar name="DBMInfoFrameTemplateBar" virtual="true">
		<Size>
			<AbsDimension x="140" y="16"/>
		</Size>
		<Layers>
			<Layer level="ARTWORK">
				<FontString name="$parentText" inherits="GameFontHighlightSmall" text="">
					<Size>
						<AbsDimension x="140" y="11"/>
					</Size>
					<Anchors>
						<Anchor point="CENTER">
							<Offset>
								<AbsDimension x="0" y="1"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
				<FontString name="$parentLeftText" inherits="GameFontHighlightSmall" text="" justifyH="LEFT">
					<Size>
						<AbsDimension x="140" y="11"/>
					</Size>
					<Anchors>
						<Anchor point="LEFT" relativePoint="LEFT">
							<Offset>
								<AbsDimension x="0" y="1"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
				<FontString name="$parentRightText" inherits="GameFontHighlightSmall" text="" justifyH="RIGHT">
					<Size>
						<AbsDimension x="140" y="11"/>
					</Size>
					<Anchors>
						<Anchor point="RIGHT" relativePoint="RIGHT">
							<Offset>
								<AbsDimension x="0" y="1"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
	</StatusBar>
</Ui>
